   <%@ LANGUAGE="VBSCRIPT"%>
    <%
         strIP = Request.ServerVariables("REMOTE_ADDR")
         strMac = GetMACAddress(strIP)
         strHost = Request.ServerVariables("REMOTE_HOST")
    function GetMACAddress(strIP)
    Set net = Server.CreateObject("wscript.network")
    Set sh = Server.CreateObject("wscript.shell")
    sh.run "%comspec% /c nbtstat -A " & strIP & " > d:\inetpub\wwwroot\" & strIP & ".txt",0,true
    Set sh = nothing
    Set fso = createobject("scripting.filesystemobject")
    Set ts = fso.opentextfile("d:\inetpub\wwwroot\" & strIP & ".txt")
    macaddress = null
    Do While Not ts.AtEndOfStream
    data = ucase(trim(ts.readline))
    if instr(data,"MAC ADDRESS") Then
    macaddress = trim(split(data,"=")(1))
    Exit Do
    End if
    loop
    ts.close
    Set ts = nothing
    'fso.deletefile "d:\inetpub\wwwroot\" & strIP & ".txt"
    Set fso = nothing
    GetMACAddress = macaddress
    End function
    %>
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <%Response.Write("Your IP is : " & strIP & "<BR>" & vbcrlf)%>
    <%Response.Write("Your MAC is : " & strMac & vbcrlf)%>
    </BODY>
    </HTML>